package com.tehmur.android.menuTest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;


public class menuTest extends Activity implements OnClickListener {
	
	Button button1,button2;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        button1 = (Button)findViewById(R.id.Button01);
        button2 = (Button)findViewById(R.id.Button02);
        
        button1.setOnClickListener(this);
        button2.setOnClickListener(this);      
   
    
    }
    

	@Override
	public void onClick(View src) {
		switch (src.getId()) {
		case R.id.Button01:
			Intent StartbuttonCounter = 
				new Intent(menuTest.this,BasicTasbi.class);
	        startActivity(StartbuttonCounter);
			break;
		case R.id.Button02:
			Intent StartbuttonDuas = 
				new Intent(menuTest.this,Duas.class);
	        startActivity(StartbuttonDuas);
			break;
		}
		
	}
	
	
	
	public boolean onCreateOptionsMenu(Menu menu) {
	    MenuInflater inflater = getMenuInflater();
	    inflater.inflate(R.menu.exit, menu);
	    return true;
	}
	
	public boolean onOptionsItemSelected(MenuItem item) {
	    switch (item.getItemId()) {
	        case R.id.icontextExit:     
	        	//Toast.makeText(this, "You have reset the counter", Toast.LENGTH_SHORT).show();
	        	finish();
			                 
	        break;

	    }
	    return true;
	}
	
}